package pers.vinsonws.jianghu.serverspring.repositories;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import pers.vinsonws.jianghu.serverspring.entity.ChatRooms;
import pers.vinsonws.jianghu.serverspring.entity.Users;


import java.util.List;
import java.util.Set;

/**
 * @auther vinsonws
 * @date 2018/10/30 19:32
 */
@Repository
public interface UsersRepository extends JpaRepository<Users, Integer> {
    Users findById(int id);
    Users findByUid(String uid);
    List<Users> findAll();
    Set<Users> findAllByAuthorityCode(int authorityCode);
    Set<Users> findAllByChatRooms(ChatRooms chatRooms);


}
